package mx.com.matersys.vacs.domain;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.TableGenerator;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "familiar")
public class Familiar {
	
	@Id
	@TableGenerator(name = "GEN_FAMI", table = "sequence", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "SEQ_FAMI", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="GEN_FAMI")
    @Column(name = "idfamiliar")
    private Integer idfamiliar;
	
	@ManyToOne
    @JoinColumn(name = "idpaciente", referencedColumnName = "id_paciente", nullable = false)
    private Paciente idpaciente;
    
    @Column(name = "nombre", length = 60)
    private String nombre;
    
    @Column(name = "direccion", length = 100)
    private String direccion;
    
    @Column(name = "telefono_casa", length = 15)
    private String telefonoCasa;
    
    @Column(name = "telefono_oficina", length = 25)
    private String telefonoOficina;
    
    @Column(name = "telefono_movil", length = 15)
    private String telefonoMovil;
    
    @Column(name = "correo_electronico", length = 60)
    private String correoElectronico;
}
